{include file="public/header" /}

<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.inquiry_title}</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>

    <form method="get" action="" name="formSearch" id="formSearch">
        <!--搜索商品-->
        <div class="ds-search-form">
            <dl>
                <dt>工位名称：</dt>
                <dd><input type="text" value="{$Request.get.search_station_name|default=''}" name="search_station_name" id="search_station_name" class="txt"></dd>
            </dl>
            <div class="btn_group">
                <a href="javascript:void(0);" id="dssubmit" class="btn" title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
                <a href="{:url('Goodinquiry/station_list')}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
                <a href="javascript:dsLayerOpen('{:url('Goodinquiry/inquiry_station_add')}', '添加工位')" class="btn btu-red">添加工位</a>
            </div>
        </div>
    </form>

    <table class="ds-default-table">
        <thead>
        <tr class="thead">
            <th>{$Think.lang.station_name}</th>
            <th>{$Think.lang.inquiry_name}</th>
            <th>{$Think.lang.station_status}</th>
            <th>{$Think.lang.created_at}</th>
            <th>{$Think.lang.ds_handle}</th>
        </tr>
        </thead>
        <tbody>
        {notempty name="station_list"}
        {foreach name="station_list" item="v" key="k" }
        <tr class="hover edit" id="ds_row_{$v.station_id}">
            <td class="">
                <span>{$v.station_name}</span>
            </td>
            <td>{$v.inquiry_name}</td>
            <td> {if condition="$v.status eq 1"} 正常 {else/} 关闭 {/if} </td>
            <td>
                {$v.created_at}
            </td>
            <td>
                <a href="javascript:dsLayerOpen('{:url('Goodinquiry/inquiry_station_add',['station_id'=>$v.station_id])}', '编辑工位')"
                   class="dsui-btn-edit">
                    <i class="iconfont"></i>{$Think.lang.ds_edit}
                </a>
                <a href="javascript:dsLayerConfirm('{:url('Goodinquiry/station_del',['station_id'=>$v.station_id])}','{$Think.lang.ds_ensure_del}',{$v.station_id})" class="dsui-btn-del">
                    <i class="iconfont"></i>删除
                </a>
            </td>
        </tr>
        {/foreach}
        {else /}
        <tr class="no_data">
            <td colspan="10">{$Think.lang.ds_no_record}</td>
        </tr>
        {/notempty}
        </tbody>
    </table>
</div>

<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
<script>
    $(function (){
        $('#dssubmit').click(function(){
            $('#formSearch').submit();
        });
    });
</script>